export default {
    methods: {
        getRoleRemote(){
            let loading = this.$loading({fullscreen: true, text: '正在加载...'});
            return new Promise((resolve, reject)=>{
                this.$svHttp.httpGet(this.$svHttp.Api.roleAll).then(response=>{
                    loading.close();
                    loading = null;
                    if(response) {
                        let { result } = response;
                        if( Array.isArray( result ) ) resolve(result);
                    }
                    resolve([]);
                });
            });
        }
    },
}